<?php
if (!defined('CURRENT_PATH')){
	die('Hacking attempt');
	}
$siteConfig=spClass(site_config);	
if($_REQUEST['act']&&$_REQUEST['act']=='save'){
$saveMapArr=array('t_1'=>25,'t_2'=>26,'t_3'=>27,'t_4'=>28,'t_5'=>29,'accessories'=>30);
foreach($saveMapArr as $id=>$v){
$siteConfig->update($conditions=array('id'=>$v),$row=array('value'=>$this->spArgs($id)));
	}
	$this->success("恭喜，操作成功");

}else{
	$res=$siteConfig->findAll($conditions ='25<=id && id<=30',$sort = null, $fields='id,value');
	$temp=array();
	foreach($res as $v){
			$temp[$v['id']]	=$v['value'];
		}
	$this->res=$temp;
	unset($temp,$res);
    $this->display('management/accessories.html');	
}